﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="load_more_audio.aspx.cs" Inherits="SQT.tracnghiem.Ajax.ASP.Certificate.load_more_audio" %>

<%@ Import Namespace="DataAccess" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<body>
    <%
        int count = int.Parse(Request.QueryString["count"]);
        var get_media = (from p in new TblLibraryController().FetchAll().Where(x => x.LibraryType == 2) orderby p.LibraryId descending select p).Skip(count).Take(12);
        foreach (TblLibrary audio in get_media)
        {
            string date = DateTime.Parse(audio.LibraryUploadDate.ToString()).Day.ToString() + "/" + DateTime.Parse(audio.LibraryUploadDate.ToString()).Month.ToString() + "/" + DateTime.Parse(audio.LibraryUploadDate.ToString()).Year.ToString();
            var get_upload = new TblManagerController().FetchAll().Where(x => x.ManagerId == audio.LibraryUploader).Single();
    %>
    <div data-toggle="tooltip" data-placement="bottom" title="Tải lên <%=date%> bởi <%=get_upload.FullName%>" class="media-item w3-quarter w3-center hvr-float">
        <div class="w3-hide media-link">../Content/testdata/audio/<%=audio.LibraryLink %></div>
        <video class="media-sound-item" src="../Content/testdata/audio/<%=audio.LibraryLink%>" poster="../Content/img/posterdefault.jpg" controls="controls"></video>
        <span><%=audio.LibraryName%></span>
    </div>
    <%} %>
</body>
</html>
